package com.easylinkin.linkappapi.safe.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.easylinkin.linkappapi.openapi.dto.BigScreenStatisticDTO;
import com.easylinkin.linkappapi.openapi.dto.ProjectStatisticDTO;
import com.easylinkin.linkappapi.safe.dto.DangerousInfoDto;
import com.easylinkin.linkappapi.safe.entity.DangerousInfo;
import com.easylinkin.linkappapi.safe.entity.vo.DangerousInfoVo;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;

/**
 * DangerousInfo表数据库访问层
 *
 * @author zhengwen
 * @date 2022/08/16
 */
public interface DangerousInfoMapper extends BaseMapper<DangerousInfo> {


    /**
     * 查询分页
     *
     * @param page             分页参数对象
     * @param appDangerousInfo 过滤参数对象
     * @return 查询分页结果
     */
    IPage<DangerousInfo> selectPage(Page page, @Param("appDangerousInfo") DangerousInfo appDangerousInfo);

    /**
     * 查询单条
     *
     * @param id 主键id
     * @return 查询结果
     */
    DangerousInfo getOneById(@Param("id") Serializable id);

    /**
     * 查询dto列表信息
     *
     * @param page            page
     * @param dangerousInfoVo 条件vo
     * @return ipage
     */
    IPage<DangerousInfoDto> selectDtoPage(Page page, DangerousInfoVo dangerousInfoVo);

    /**
     * @param id
     * @return
     */
    DangerousInfoDto selectOneDtoById(Long id);

    /**
     * 大屏-危大工程分类查询
     * @param dangerousInfo
     * @return
     */
    List<BigScreenStatisticDTO> selectDangerousStatistic(@Param("dangerousInfo") DangerousInfo dangerousInfo);

    List<ProjectStatisticDTO> selectDangerProjectNum();
}

